-- GENERATED SPELL FOR [Justinius the Harbinger] --


function spell0_18966(pUnit, Event) --@Consecration,Self--
pUnit:FullCastSpellOnTarget(33559,pUnit)
pUnit:RegisterEvent('Sorts_18966', 20000, 1)
end

function spell1_18966(pUnit, Event) --@Divine Shield,Self--
pUnit:FullCastSpellOnTarget(33581,pUnit)
pUnit:RegisterEvent('Sorts_18966', 10281, 1)
end

function spell2_18966(pUnit, Event) --@Flash of Light,Heal--
pUnit:FullCastSpellOnTarget(33641,pUnit)
pUnit:RegisterEvent('Sorts_18966', 1500, 1)
end

function spell3_18966(pUnit, Event) --@Greater Blessing of Might,n/a--
pUnit:FullCastSpellOnTarget(33564,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18966', 30252, 1)
end

function spell4_18966(pUnit, Event) --@Judgement of Command,n/a--
pUnit:FullCastSpellOnTarget(33554,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18966', 0, 1)
end

function Sorts_18966(pUnit, Event)
local choix_sorts_18966 = math.random(0, 4)
if choix_sorts_18966 == 0 then
pUnit:RegisterEvent('spell0_18966', 1, 1)
end
if choix_sorts_18966 == 1 then
pUnit:RegisterEvent('spell1_18966', 1, 1)
end
if choix_sorts_18966 == 2 then
pUnit:RegisterEvent('spell2_18966', 1, 1)
end
if choix_sorts_18966 == 3 then
pUnit:RegisterEvent('spell3_18966', 1, 1)
end
if choix_sorts_18966 == 4 then
pUnit:RegisterEvent('spell4_18966', 1, 1)
end
end

function mob18966_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_18966', math.random(1500, 3000), 1)
end

function mob18966_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18966_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18966_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(18966, 1, 'mob18966_Action')
RegisterUnitEvent(18966, 2, 'mob18966_Leave')
RegisterUnitEvent(18966, 3, 'mob18966_Kill')
RegisterUnitEvent(18966, 4, 'mob18966_Die')
